﻿namespace Corporation.Project.Entities
{
    /// <summary>
    /// 实体类：文章信息
    /// </summary>
    [Description("文章信息")]
    [Table(nameof(Article), Schema = Constants.Schema)]
    public class Article : EntityBase<Guid>, ICreatedTime
    {
        /// <summary>
        /// 类型
        /// </summary>
        [Required]
        [DisplayName("类型")]
        public ArticleType Type { get; set; }

        [DisplayName("图片Base64字符串")]
        [StringSize(StringSizeType.Data)]
        public string ImageBase64 { get; set; }

        [DisplayName("单图片Url路径")]
        [StringSize(StringSizeType.Content)]
        public string[] ImageUrl { get; set; }

        [DisplayName("多图片Url路径")]
        [StringSize(StringSizeType.Data)]
        public string[] ImageUrls { get; set; }

        [DisplayName("文件路径")]
        public string[] FileUrls { get; set; }

        /// <summary>
        /// 文章标题
        /// </summary>
        [Required]
        [StringSize(StringSizeType.General)]
        [DisplayName("标题")]
        public string Title { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        [DisplayName("排序号")]
        public int OrderNo { get; set; }

        /// <summary>
        /// 文章内容
        /// </summary>
        [DisplayName("文章内容")]
        [StringSize(StringSizeType.Data)]
        public string Content { get; set; }

        #region 接口字段
        /// <summary>
        /// 获取或设置 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        public DateTime CreatedTime { get; set; }

        #endregion
    }
}